home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 4: GNU Archives / Linux Cubed Series 4 - GNU Archives.iso / gnu / fontutil.6 / fontutil / fontutils-0.6 / include / c-namemx.h < prev    next >
Encoding:
C/C++ Source or Header  |  1992-03-27  |  1.2 KB  |  42 lines

  1. /* c-name_max.h: define NAME_MAX, the maximum length of a single
  2.    component in a pathname.
  3.  
  4. Copyright (C) 1992 Free Software Foundation, Inc.
  5.  
  6. This program is free software; you can redistribute it and/or modify
  7. it under the terms of the GNU General Public License as published by
  8. the Free Software Foundation; either version 2, or (at your option)
  9. any later version.
  10.  
  11. This program is distributed in the hope that it will be useful,
  12. but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  14. GNU General Public License for more details.
  15.  
  16. You should have received a copy of the GNU General Public License
  17. along with this program; if not, write to the Free Software
  18. Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
  19.  
  20. #ifndef C_NAME_MAX_H
  21. #define C_NAME_MAX_H
  22.  
  23. #include "c-limits.h"
  24.  
  25. #ifdef _POSIX_VERSION
  26. #ifndef NAME_MAX
  27. #define NAME_MAX pathconf ("/", _PC_NAME_MAX)
  28. #endif
  29. #endif /* not _POSIX_VERSION */
  30.  
  31. /* Most likely the system will truncate filenames if it is not POSIX,
  32.    and so we can use the BSD value here.  */
  33. #ifndef _POSIX_NAME_MAX
  34. #define _POSIX_NAME_MAX 255
  35. #endif
  36.  
  37. #ifndef NAME_MAX
  38. #define NAME_MAX _POSIX_NAME_MAX
  39. #endif
  40.  
  41. #endif /* not C_NAME_MAX_H */
  42.